﻿using WebApiClientCore;
using WebApiClientCore.Attributes;
using BPM.Web.Shared.Data;
using BPM.Web.Shared.Auth;

namespace BPM.Web.Shared.Service;

[TokenFilter]
public interface IOnlineUserClient : IHttpApi
{
    /// <summary>
    /// 分页获取在线用户信息
    /// </summary>
    /// <param name="body"></param>
    /// <param name="token"></param>
    /// <returns></returns>
    [HttpGet("sysOnlineUser/page")]
    ITask<XnRestfulResult<PageResult<OnlineUserOutput>>> PageAsync(OnlineuserPageInput body, CancellationToken token = default);

    /// <summary>
    /// 获取在线用户信息
    /// </summary>
    /// <param name="token"></param>
    /// <returns></returns>
    [HttpGet("sysOnlineUser/list")]
    ITask<XnRestfulResult<List<OnlineUserOutput>>> ListAsync(CancellationToken token = default);

    /// <summary>
    /// 强制下线
    /// </summary>
    /// <param name="body"></param>
    /// <param name="token"></param>
    /// <returns></returns>
    [HttpPost("sysOnlineUser/forceExist")]
    ITask<XnRestfulResult<string>> ForceExistAsync([JsonContent] OnlineUser body, CancellationToken token = default);
}
